/*
 * Copyright (c) 2009, Jan Pastor. All Rights Reserved.
 */

package sk.jp.imageio.jpeg.metadata;

/**
 * Image rating.
 * <p>Thread safe.
 */
public class Rating {

    private int value;

    //----------------------------------------------------------------------

    public Rating() {
        value = 0;
    }

    //----------------------------------------------------------------------

    public synchronized int getValue() {
        return value;
    }

    public synchronized void setValue(int value) {
        this.value = value;
    }

    @Override
    public synchronized String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("Rating");
        sb.append("{value=").append(value);
        sb.append('}');
        return sb.toString();
    }
}
